
const defaultOpts = {
    url:'',
    filePath:'',
    name: '',
    header: {
     'content-type': 'multipart/form-data'
    }
}

export default (config :any)=> new Promise((resolve,reject)=>{

        let opts = Object.assign(defaultOpts,config);
        uni.uploadFile({
            ...opts,
            success:(r:any)=>resolve(r),
            fail:(err:any)=>reject(err)
        })



})
